<template>
    <admin-container>
        <el-alert
            title="403"
            type="error"
            description="权限不足以操作此页面"
            :closable="false"
            show-icon>
        </el-alert>

        <div style="text-align: center; margin-top: 20px">
            <el-button type="warning" @click="onReset">重试</el-button>

            <el-button @click="onHome">管理首页</el-button>
        </div>
    </admin-container>
</template>

<script lang="ts">
import { Vue, Component } from 'vue-property-decorator';
import AdminContainer from '@/components/admin-container.vue';
import { AuthModule } from '@/store/auth';
@Component({
    components: { AdminContainer }
})
export default class Page extends Vue {
    onReset() {
        AuthModule.canPage({ route: this.$route.name });
        this.$router.replace({
            query: {
                t: (new Date().valueOf()).toString(),
            }
        })
    }

    onHome() {
        this.$router.push('/');
    }
}
</script>
